package com.lhdx.practical.excelBean;

import cn.afterturn.easypoi.excel.annotation.Excel;
import com.lhdx.practical.bean.Person;

public class ExcelStudent {
    @Excel(name = "学生姓名")
    private String realname;
    @Excel(name = "性别")
    private String sex;
    @Excel(name = "学号")
    private String userno;
    @Excel(name = "登录用户名")
    private String username;
    @Excel(name = "登录密码")
    private String password;
    @Excel(name = "学生简介")
    private String profile;
    @Excel(name = "年级")
    private String gradename;
    @Excel(name = "班级")
    private String departname;

    public ExcelStudent(){};

    public ExcelStudent(Person person){
        this.realname = person.getRealname();
        this.userno = person.getUserno();
        this.username = person.getUsername();
        this.password = person.getPassword();
        this.profile = person.getProfile();
        this.gradename = person.getGradename();
        this.departname = person.getDepartname();
        if(person.getSex() == 0){
            this.sex = "男";
        }else{
            this.sex = "女";
        }
    }

    public String getRealname() {
        return realname;
    }

    public void setRealname(String realname) {
        this.realname = realname;
    }

    public String getUserno() {
        return userno;
    }

    public void setUserno(String userno) {
        this.userno = userno;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getProfile() {
        return profile;
    }

    public void setProfile(String profile) {
        this.profile = profile;
    }

    public String getGradename() {
        return gradename;
    }

    public void setGradename(String gradename) {
        this.gradename = gradename;
    }

    public String getDepartname() {
        return departname;
    }

    public void setDepartname(String departname) {
        this.departname = departname;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
